﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tasks.Common.Enum;

namespace Tasks.Common.Entitys
{
    // <summary><c>SmartTicket2Product</c> Business Object.</summary>
    [Serializable]
    public partial class SmartTicket2Product
    {

        #region ID

        private Int32 m_iD;

        /// <summary>Gets or sets ID</summary>
        public Int32 ID
        {
            get { return m_iD; }
            set { m_iD = value; }
        }

        #endregion

        #region ProductID

        private Int32 m_productID;

        /// <summary>Gets or sets ProductID</summary>
        public Int32 ProductID
        {
            get { return m_productID; }
            set { m_productID = value; }
        }

        #endregion

        /// <summary>
        /// 票型  门票为票型，酒店为房型，餐厅为餐标
        /// </summary>
        public int ProductChildID { get; set; }

        #region ProductType

        private Int32 m_productType;

        /// <summary>Gets or sets ProductType</summary>
        public Int32 ProductType
        {
            get { return m_productType; }
            set { m_productType = value; }
        }

        #endregion

        #region ProductName

        private String m_productName;

        /// <summary>Gets or sets ProductName</summary>
        public String ProductName
        {
            get { return m_productName; }
            set { m_productName = value; }
        }

        #endregion

        #region UseState

        private Int32 m_useState;

        /// <summary>Gets or sets UseState</summary>
        public Int32 UseState
        {
            get { return m_useState; }
            set { m_useState = value; }
        }

        #endregion

        #region SmartTicketID

        private Int32 m_smartTicketID;

        /// <summary>Gets or sets SmartTicketID</summary>
        public Int32 SmartTicketID
        {
            get { return m_smartTicketID; }
            set { m_smartTicketID = value; }
        }

        #endregion

        #region AvailableTime1

        private DateTime m_availableTime1;

        /// <summary>Gets or sets AvailableTime1</summary>
        public DateTime AvailableTime1
        {
            get { return m_availableTime1; }
            set { m_availableTime1 = value; }
        }

        #endregion

        #region AvailableTime2

        private DateTime m_availableTime2;

        /// <summary>Gets or sets AvailableTime2</summary>
        public DateTime AvailableTime2
        {
            get { return m_availableTime2; }
            set { m_availableTime2 = value; }
        }

        #endregion

        #region ActiveDate

        private DateTime m_activeDate;

        /// <summary>Gets or sets ActiveDate</summary>
        public DateTime ActiveDate
        {
            get { return m_activeDate; }
            set { m_activeDate = value; }
        }

        #endregion

        #region ActiveUserID

        private Int32 m_activeUserID;

        /// <summary>Gets or sets ActiveUserID</summary>
        public Int32 ActiveUserID
        {
            get { return m_activeUserID; }
            set { m_activeUserID = value; }
        }

        #endregion

        public int State { get; set; }

        public string UserStateToStr()
        {
            return CommonUtil.GetEnumDescription(typeof(TicketGroup2ProductUserState), this.UseState);
        }

        public string ToStateStr()
        {
            return CommonUtil.GetEnumDescription(typeof(SmartTicketState), this.State);
        }
        public string ToOrderStateStr()
        {
            switch (this.State)
            {
                case 0:
                    return "等待预定";
                case 1:
                    return "预订成功";
                case 7:
                    return "交易成功";
            }
            return "";
        }
        public int Amount { get; set; }
        public decimal UnitPrice { get; set; }
        public decimal Money { get; set; }
        public int ParentID { get; set; }
        public int TicketGroupProductID { get; set; }
        public int OwnerID { get; set; }

        #region 酒店扩展字段
        public string No { get; set; }
        public string UserName { get; set; }
        public string UserMobileNo { get; set; }
        public int UserID { get; set; }
        public int AvailableDay { get; set; }
        public string OrderNo { get; set; }
        public string HotelName { get; set; }
        public int state { get; set; }
        public string Remark { get; set; }
        public string Linkman { get; set; }
        public string LinkmanTel { get; set; }
        public string ReceiveTel { get; set; }
        #endregion

        #region 景区扩展字段
        public string SceneryName { get; set; }
        public string TicketName { get; set; }
        #endregion


    }
}
